package com.wnxy.config;

import com.wnxy.intecepters.AuthIntercepter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Classname MyWebConfig
 * @Description :
 * @Date 2021/3/1 18:05
 * @Created by Yeheng
 */
@Configuration
public class MyWebConfig implements WebMvcConfigurer {

    @Autowired
    AuthIntercepter intercepter;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(intercepter).addPathPatterns("/**");
    }
}
